package com.zyf.project.capchain.listener.state.excimpl;

import com.zyf.project.capchain.listener.state.State;

/**
 * @author Zhou Yifan
 */
public enum WxExceptionState implements State {

    /**
     * 获取 openid 失败
     */
    WX_LOGIN_NO_OPENID() {
        @Override
        public Integer code() {
            return 801;
        }

        @Override
        public String message() {
            return "获取openid失败/授权失败";
        }

        @Override
        public Boolean isSuccess() {
            return false;
        }
    },

    /**
     * 用户不存在
     */
    WX_LOGIN_USER_NOT_EXIST() {
        @Override
        public Integer code() {
            return 802;
        }

        @Override
        public String message() {
            return "用户不存在";
        }

        @Override
        public Boolean isSuccess() {
            return false;
        }
    },

    /**
     * Token 异常
     */
    TOKEN_ERROR() {
        @Override
        public Integer code() {
            return 803;
        }

        @Override
        public String message() {
            return "token 异常";
        }

        @Override
        public Boolean isSuccess() {
            return false;
        }
    }

}
